package com.yn.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum AuditStatusEnum {

	RUNING(0, "审核中"),

	PASS(1, "通过"),

	NO_PASS(3, "不通过"),

	;

	private Integer code;

	private String name;

	public static AuditStatusEnum getByCode(Integer code) {
		if(null == code) {
			return null;
		}
		for(AuditStatusEnum auditStatusEnum : AuditStatusEnum.values()) {
			if(auditStatusEnum.getCode() == code) {
				return auditStatusEnum;
			}
		}
		return null;
	}

}
